﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >
    <Color x:Key="TabItemGradStart" R="#AA" G="#AA" B="#BB"/>
    <Color x:Key="TabItemGradEnd" >#FF838383</Color>
    <Color x:Key="TabItemGradStartSel" R="#00" G="#00" B="#DD"/>    
    <Color x:Key="TabItemGradEndSel" >#FF434343</Color>
    <Color x:Key="TabItemGradStartDisabled" R="#AA" G="#AA" B="#AA"/>
    <Color x:Key="TabItemGradEndDisabled" >#FF393939</Color>
    <Color x:Key="TabItemGradStartHover" R="#FF" G="#FF" B="#66"/>
    <Color x:Key="TabItemGradEndHover" R="#FF" G="#FF" B="#99" A="#FF"/>
    <Color x:Key="TabForegroundBrushDisabled" R="#FF" G="#FF" B="#99" A="#FF"/>
    

    <LinearGradientBrush x:Key="TabBackgorundBrush" StartPoint="0,0" EndPoint="0,1" >
        <GradientStop Offset="0" Color="{StaticResource TabItemGradStart}"/>
        <GradientStop Offset="0.99" Color="#FF2F2F2F"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="TabBackgorundBrushSel" EndPoint="0.5,1" StartPoint="0.5,0">
    	<GradientStop Color="#FF8D8D8D" Offset="0"/>
    	<GradientStop Color="#FF1D1D1D" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="TabBackgorundBrushDisabled" StartPoint="0,0" EndPoint="0,1" >
        <GradientStop Offset="0" Color="{StaticResource TabItemGradStartDisabled}"/>
        <GradientStop Offset="0.994" Color="{StaticResource TabItemGradEndDisabled}"/>
        <GradientStop Color="#FB545454" Offset="0.505"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="TabBackgorundBrushHover" StartPoint="0,0" EndPoint="0,1" >
        <GradientStop Offset="0" Color="{StaticResource TabItemGradStartHover}"/>
        <GradientStop Offset="1" Color="{StaticResource TabItemGradEndHover}"/>
    </LinearGradientBrush>


<!--
        <Style TargetType="{x:Type TreeViewItem}">
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Ellipse Width="11" Fill="Blue" Height="11" />
                            <TextBlock Text="{Binding Mode=Default}" Margin="5,0" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>

-->


    <Style x:Key="GelTabItem" TargetType="{x:Type TabItem}">
	  <Setter Property="BorderThickness" Value="0"/>
	  <Setter Property="BorderBrush" Value="DarkGray"/>
	  <Setter Property="Background" Value="Transparent"/>
	  <Setter Property="VerticalContentAlignment" Value="Center"/>
	  <Setter Property="HorizontalContentAlignment" Value="Center"/>		  
	  <Setter Property="Template">
	    <Setter.Value>
	      <ControlTemplate TargetType="{x:Type TabItem}">
	        <Border Padding="1">
	          <Grid Height="20">
	              <Border CornerRadius="5,5,5,5" Background="{TemplateBinding Background}" 
	                   BorderBrush="{TemplateBinding BorderBrush}" 
	                   BorderThickness="{TemplateBinding BorderThickness}" />
                            <Rectangle Name="TabItemBackgorund" RadiusX="5" 
                                 RadiusY="5" Fill="{StaticResource TabBackgorundBrush}">
                            </Rectangle>
                  <Border BorderThickness="{TemplateBinding BorderThickness}" 
                          Padding="{TemplateBinding Padding}">
	              <ContentPresenter ContentSource="Header" 
	                 HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
	                 VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
	            </Border>
	          </Grid>
	        </Border>
            <ControlTemplate.Triggers>
                 <Trigger Property="IsSelected" Value="True">
                    <Setter TargetName="TabItemBackgorund" Property="Fill" 
                            Value="{StaticResource TabBackgorundBrushSel}" />
                </Trigger>
                <Trigger Property="IsSelected" Value="False">
                    <Setter TargetName="TabItemBackgorund" Property="Fill" 
                            Value="{StaticResource TabBackgorundBrush}" />
                </Trigger>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter TargetName="TabItemBackgorund" Property="Fill" 
                            Value="{StaticResource TabBackgorundBrushDisabled}" />
                        </Trigger>
            </ControlTemplate.Triggers>
            </ControlTemplate>
	    </Setter.Value>
	  </Setter>
	</Style>
	<Style x:Key="GelTabControl" TargetType="{x:Type TabControl}">
	  <Setter Property="Template">
	    <Setter.Value>
	      <ControlTemplate TargetType="TabControl">
	        <Grid>
	          <Grid.RowDefinitions>
	            <RowDefinition Height="Auto"/>
	            <RowDefinition Height="*"/>
	          </Grid.RowDefinitions>
	          <Border BorderBrush="Transparent" BorderThickness="0" Grid.Row="1" 
                      CornerRadius="5,5,5,5" Background="Transparent" Padding="5,5,5,5" >
                  <Border BorderBrush="Gray" BorderThickness="0" CornerRadius="5,5,5,5" 
                          Background="Transparent"  >
                    <ContentPresenter ContentSource="SelectedContent" />                
                  </Border>
	          </Border>
	          <TabPanel Grid.Row="0" IsItemsHost="true"/>
	        </Grid>
	      </ControlTemplate>
	    </Setter.Value>
	  </Setter>
	</Style>		
</ResourceDictionary>